home *** CD-ROM | disk | FTP | other *** search
- stop();
- speed = 0;
- cont = 0;
- this.onEnterFrame = function()
- {
- cont2++;
- if(cont2 % 3 == 0)
- {
- if(Key.isDown(32))
- {
- if(_root.sunet == 1)
- {
- _root.son1.start();
- }
- _root.gl.duplicateMovieClip("gl" + cont,cont);
- _root["gl" + cont].gotoAndPlay(1);
- _root["gl" + cont]._rotation = _root.plane._rotation;
- _root["gl" + cont]._x = _root.plane._x + 10;
- _root["gl" + cont]._y = _root.plane._y;
- cont++;
- }
- }
- if(cont > 100)
- {
- cont = 0;
- }
- if(_Y + speed > 20)
- {
- _Y = _Y + speed;
- }
- else
- {
- speed = Math.abs(speed);
- }
- if(_Y + speed < 340)
- {
- _Y = _Y + speed;
- }
- else
- {
- speed = - Math.abs(speed);
- }
- if(_X + speeX > 80)
- {
- _X = _X + speedX;
- }
- else
- {
- speedX = Math.abs(speedX);
- }
- if(_X + speed < 530)
- {
- _X = _X + speedX;
- }
- else
- {
- speedX = - Math.abs(speedX);
- }
- _X = _X + speedX;
- if(Key.isDown(38))
- {
- speed = -3;
- if(_rotation > -60)
- {
- _rotation = _rotation - 4;
- }
- }
- else if(Key.isDown(40))
- {
- speed = 3;
- if(_rotation < 60)
- {
- _rotation = _rotation + 4;
- }
- }
- else if(speed > 0)
- {
- speed -= 0.5;
- }
- else if(speed < 0)
- {
- speed += 0.5;
- }
- if(Key.isDown(37))
- {
- speedX = -3;
- }
- else if(Key.isDown(39))
- {
- speedX = 3;
- }
- else if(speedX > 0)
- {
- speedX -= 0.25;
- }
- else if(speedX < 0)
- {
- speedX += 0.25;
- }
- if(!Key.isDown(38) && !Key.isDown(40))
- {
- if(_rotation > 0)
- {
- _rotation = _rotation - 4;
- }
- else if(_rotation < 0)
- {
- _rotation = _rotation + 4;
- }
- }
- };
-